package com.shareppy.norman.util;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import android.content.ContentValues;

import com.shareppy.utils.conversion.Converter;

public class ContentValuesToMapValuesConverter implements Converter<ContentValues, Map<String, Object>> {

	@Override
	public Map<String, Object> convert(ContentValues input) throws Exception {
		Map<String, Object> map = new LinkedHashMap<String, Object>();
		Set<Entry<String, Object>> entrySet = input.valueSet();
		for (Entry<String, Object> entry : entrySet) {
			Object value = entry.getValue();
				map.put(entry.getKey(), (Integer)value);
		}
		return map;
	}
}